<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0"/>
    <title>个人中心</title>
    <link rel="stylesheet" href="https://res.wx.qq.com/open/libs/weui/1.1.2/weui.min.css"/>
    <style type="text/css">
    .page__hd {
	    padding: 40px;
	}
    .page__title {
	    text-align: left;
	    font-size: 20px;
	    font-weight: 400;
	}
	h1 {
	    display: block;
	    font-size: 2em;
	    -webkit-margin-before: 0.67em;
	    -webkit-margin-after: 0.67em;
	    -webkit-margin-start: 0px;
	    -webkit-margin-end: 0px;
	    font-weight: bold;
	}
	body {
	    line-height: 1.6;
	    font-family: -apple-system-font,Helvetica Neue,Helvetica,sans-serif;
	     background-color: #f8f8f8;
	}
	.page__desc {
	    margin-top: 5px;
	    color: #888;
	    text-align: left;
	    font-size: 14px;
	}
    </style>
</head>
<body th:inline="text">
<div class="page input js_show">
    <div class="page__hd">
    	<h1 class="page__title">[[${email}]]</h1>
        <p class="page__desc">子账户：[[${bmpAccount.name}]]&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:show();">点击切换</a></p>
        <p class="page__desc">当前币种：[[${coinType}]]</p>
    </div>
    <div class="page__bd">
		<div class="weui-form-preview">
            <!-- <div class="weui-form-preview__hd">
                <div class="weui-form-preview__item">
                    <label class="weui-form-preview__label">币种</label>
                    <em class="weui-form-preview__value">[[${coinType}]]</em>
                </div>
            </div> -->
            <div class="weui-form-preview__bd">
                <div class="weui-form-preview__item">
                    <label class="weui-form-preview__label">[[#{i18n.text_70}]]</label>
                    <span class="weui-form-preview__value">[[${runMine}]]/[[${totalMine}]]</span>
                </div>
                <div class="weui-form-preview__item">
                    <label class="weui-form-preview__label">[[#{i18n.text_71}]]</label>
                    <span class="weui-form-preview__value">[[${sumEarn}]]</span>
                </div>
                <div class="weui-form-preview__item">
                    <label class="weui-form-preview__label">[[#{i18n.text_72}]]</label>
                    <span class="weui-form-preview__value">[[${income24}]]</span>
                </div>
                <div class="weui-form-preview__item">
                    <label class="weui-form-preview__label">[[#{i18n.text_73}]]</label>
                    <span class="weui-form-preview__value">[[${totalIncome}]]</span>
                </div>
            </div>
        </div>
        
        <div class="weui-form-preview" style="margin-top: 20px;">
            <div class="weui-form-preview__hd">
                <label class="weui-form-preview__label"><b>我的算力</b></label>
                <em class="weui-form-preview__value">&nbsp;</em>
            </div>
            <div class="weui-form-preview__bd">
                <div class="weui-form-preview__item">
                    <label class="weui-form-preview__label">1M</label>
                    <span class="weui-form-preview__value">[[${accountAcceptDto}? ${accountAcceptDto.speed1m}:'0.00']]</span>
                </div>
                <div class="weui-form-preview__item">
                    <label class="weui-form-preview__label">5M</label>
                    <span class="weui-form-preview__value">[[${accountAcceptDto}? ${accountAcceptDto.speed5m}:'0.00']]</span>
                </div>
                <div class="weui-form-preview__item">
                    <label class="weui-form-preview__label">15M</label>
                    <span class="weui-form-preview__value">[[${accountAcceptDto}? ${accountAcceptDto.speed15m}:'0.00']]</span>
                </div>
                <div class="weui-form-preview__item">
                    <label class="weui-form-preview__label">1H</label>
                    <span class="weui-form-preview__value">[[${accountAcceptDto}? ${accountAcceptDto.speed1h}:'0.00']]</span>
                </div>
            </div>
        </div>
    </div>
    
    
    <div>
        <div class="weui-mask" style="opacity: 1; display: none;"></div>
        <div class="weui-actionsheet">
            <div class="weui-actionsheet__title ">
                <p class="weui-actionsheet__title-text">选择查询子账户</p>
            </div>
            <div class="weui-actionsheet__menu" th:each="ba : ${bmpAccounts}">
                <div class="weui-actionsheet__cell" th:attr="acccountid=${ba.id}" th:text="${ba.name}" ></div>
            </div>
            <div class="weui-actionsheet__action">
                <div class="weui-actionsheet__cell">取消</div>
            </div>
        </div>
    </div>
    
    
    
    <div class="weui-footer weui-footer_fixed-bottom">
   		<p class="weui-footer__links">
            <a th:href="@{/mobile/home/income}" class="weui-footer__link">收益记录</a>
        </p>
        <p class="weui-footer__text">© Copyright TIGERPOOL 2018. All Rights Reserved</p>
    </div>
</div>
<script th:src="@{/js/jquery-1.11.1.min.js}"></script>
<script type="text/javascript">
	//取消
	$(".weui-actionsheet__cell").click(function(){
		$(".weui-mask").hide();
		$(".weui-actionsheet").removeClass("weui-actionsheet_toggle");
	});
	
	$(".weui-mask").click(function(){
		$(".weui-mask").hide();
		$(".weui-actionsheet").removeClass("weui-actionsheet_toggle");
	});
	
	function show(){
		$(".weui-mask").show();
		$(".weui-actionsheet").addClass("weui-actionsheet_toggle");
	}
	
	$(".weui-actionsheet__cell").click(function(){
		
		var $that= $(this);
		var accountId = $that.attr("acccountid");
		$.post("/home/accountChange/"+accountId,{},function(data){
			if(data){
				window.location.reload();
			}
		});
	});
	
</script>
</body>
</html>